package com.example.springbootstart;

import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@SpringBootApplication
@RestController
@Slf4j
public class SpringBootStartApplication implements CommandLineRunner {

    public static void main(String[] args) {
        SpringApplication.run(SpringBootStartApplication.class, args);
    }

    @Override
    public void run(String... args) throws Exception {
        //log.info("App started");
        System.out.println("App started");
    }

    @GetMapping("/hello")
    public String hello() {
        return "Hello World";
    }
}
